import hyRequest from "@/service/index";
import type { ILogin } from "@/types";

export function userLoginApi(data: ILogin) {
  return hyRequest.post({
    url: "/login",
    data,
  });
}

export function getUserInfoById(id: number) {
  return hyRequest.get({
    url: `/users/${id}`,
  });
}

export function getUserMenusByRoleId(id: number) {
  return hyRequest.get({
    url: `/role/${id}/menu`,
  });
}
